package com.steakliu.sun.ratelimiter.api;

import com.steakliu.sun.constant.RateLimiterConstant;
import com.steakliu.sun.spi.annotation.Join;
import com.steakliu.sun.spi.annotation.SPI;

/**
 * 功能说明： 服务限流顶层接口
 * <p>
 * Original @Author: steakliu-刘牌, 2023-02-07  15:13
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@SPI(RateLimiterConstant.GUAVA)
public interface SunRateLimiter {

    boolean tryAcquire();

    void release();

    default void init(int milliseconds, int permits){}
}
